package edu.jd.movieplatform.admin.a_comment;

import edu.jd.movieplatform.common.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/admin/a_comment")
public class a_CommentAPI {

    @Resource
    private a_CommentService a_commentService;

    @GetMapping("")
    public Result commentList(a_CommentDto dto){
        Map<String,Object> page=a_commentService.getCommentList(dto);
        return Result.success(page);
    }

    @DeleteMapping("/{id}")
    public Result commentDelete(@PathVariable Integer id){
        a_commentService.deleteComment(id);
        return Result.success();
    }

}
